package components.gamelevels;

import scenes.GameOverScene;
import images.GameImagesMap;

import com.uqbar.vainilla.GameScene;
import components.blocks.Block;
import components.blocks.BlockLevel1;
import components.blocks.PupBlock;
import components.decoration.Background;
import components.powerups.PupLargePaddle;
import components.powerups.PupTripleBalls;

public class Level2 extends GameLevel {

	public Level2(int initialLifes, int initialScore) {
		super("Level 2", 5000, initialLifes, initialScore);
	}

	@Override
	public BlocksMatrix getMatrix() {
		BlocksMatrix matrix = new BlocksMatrix(30, Block.WIDTH, Block.HEIGHT);
		matrix.addBlock(new BlockLevel1(), 4, 0);
		matrix.addBlock(new BlockLevel1(), 4, 1);
		matrix.addBlock(new BlockLevel1(), 4, 2);
		matrix.addBlock(new BlockLevel1(), 4, 3);
		matrix.addBlock(new BlockLevel1(), 4, 4);
		matrix.addBlock(new BlockLevel1(), 4, 5);
		matrix.addBlock(new BlockLevel1(), 0, 3);
		matrix.addBlock(new PupBlock(new PupTripleBalls()), 2, 3);
		matrix.addBlock(new PupBlock(new PupTripleBalls()), 1, 3);
		matrix.addBlock(new BlockLevel1(), 3, 3);
		matrix.addBlock(new BlockLevel1(), 5, 3);
		matrix.addBlock(new PupBlock(new PupLargePaddle()), 6, 3);
		matrix.addBlock(new PupBlock(new PupLargePaddle()), 7, 3);
		matrix.addBlock(new BlockLevel1(), 8, 3);
		return matrix;
	}

	protected void addMainBackground() {
		Background bg = new Background(GameImagesMap.getImage("bglevel2"));
		this.addComponent(bg);
	}
	@Override
	protected GameScene getNextScene(int currentScore, int currentLifes) {
		return new GameOverScene(currentScore);
	}



}
